@echo off
chcp 65001 >nul
echo ================================
echo 日志测试服务 - 批量测试脚本
echo ================================
echo.

echo [1/12] 测试正常访问...
curl http://localhost:8081/test/normal
echo.
echo.
timeout /t 2 >nul

echo [2/12] 测试数据库慢查询...
curl http://localhost:8081/test/slow-db
echo.
echo.
timeout /t 2 >nul

echo [3/12] 测试空指针异常...
curl http://localhost:8081/test/null-pointer
echo.
echo.
timeout /t 2 >nul

echo [4/12] 测试数据库连接失败...
curl http://localhost:8081/test/db-connection-error
echo.
echo.
timeout /t 2 >nul

echo [5/12] 测试网络超时...
curl http://localhost:8081/test/network-timeout
echo.
echo.
timeout /t 2 >nul

echo [6/12] 测试内存警告...
curl http://localhost:8081/test/memory-warning
echo.
echo.
timeout /t 2 >nul

echo [7/12] 测试用户认证失败...
curl http://localhost:8081/test/auth-failed
echo.
echo.
timeout /t 2 >nul

echo [8/12] 测试并发访问...
curl http://localhost:8081/test/concurrent-access
echo.
echo.
timeout /t 2 >nul

echo [9/12] 测试文件操作失败...
curl http://localhost:8081/test/file-operation-error
echo.
echo.
timeout /t 2 >nul

echo [10/12] 测试业务逻辑错误...
curl http://localhost:8081/test/business-error
echo.
echo.
timeout /t 2 >nul

echo [11/12] 批量生成混合日志(30条)...
curl http://localhost:8081/test/generate-batch?count=30
echo.
echo.
timeout /t 2 >nul

echo [12/12] 健康检查...
curl http://localhost:8081/test/health
echo.
echo.

echo ================================
echo 所有测试完成！
echo 请到日志分析平台查看收集到的日志
echo ================================
pause
